# Common reasons for ads not showing

Use the following guide to understand common reasons why apps show few or no ads.

## Did you recently create your AdMob account?

Your account must be approved before ad requests will succeed.
When you first sign up for AdMob, your account is reviewed before it’s approved.
This typically takes less than 24 hours, but in rare cases can take up to 2 weeks.
You'll be notified of approval or rejection via email after review.

## Is your app or ad unit new?

New apps and ad units take some time to activate.
Here are common reasons you may not see live impressions immediately:

- It usually takes at least an hour after you create an app or ad unit
- Sometimes it can take a few days for ads to appear in new apps or ad units
- New iOS apps will not show Google ads until they’re listed in the Apple App Store

## Test ads not showing up

If you set up an app-ads.txt file for your app, you need to also include this line in your app-ads.txt file in order to load ads using the demo ad units:
`google.com, pub-3940256099942544, DIRECT, f08c47fec0942fa0`

- Set up app-ads.txt [iOS](https://developers.google.com/admob/ios/app-ads), [Android](https://developers.google.com/admob/android/app-ads)
- Enabling test ads [iOS](https://developers.google.com/admob/ios/test-ads), [Android](https://developers.google.com/admob/android/test-ads)

Alternatively, you can enable test devices and use your own ad unit IDs instead.

### Check Your ApplicationId

If you initiated your project with `react-native init`, the auto-generated `applicationId` might not fulfill the required structure or uniqueness needed for AdMob integration. This can lead to issues where the request was succesfull but no ads are shown. Here are common reasons and fixes related to `applicationId` issues:

- **Non-unique ApplicationId**: The default `applicationId` may clash with existing apps, especially if you haven't customized it. AdMob requires a unique identifier for each app to correctly manage ad requests and revenue.

- **Improperly Structured ApplicationId**: The `applicationId` should generally follow Java package name conventions, such as `com.companyname.appname`. It must start with a letter, and can only include letters (a-z, A-Z), numbers (0-9), and underscores (_). 

Google documentation: [Configure the app module](https://developer.android.com/build/configure-app-module?hl=de)

**Important**:  If you change the application ID of an already published app, Google Play Store treats the upload as a completely different app!


### Enable test devices

If you want to do more rigorous testing with production-looking ads, configure your device as a test device and use your own ad unit IDs that you've created in the AdMob UI.
Test devices can either be added in the AdMob UI or programmatically using the Google Mobile Ads SDK.

Follow the steps below to add your device as a test device.

#### Add your test device in the AdMob UI

For a simple, non-programmatic way to add a test device and test new or existing app builds, use the AdMob UI.
[Learn how](https://support.google.com/admob/answer/9691433).

#### Add your test device programmatically

If you want to test ads in your app as you're developing, follow the steps below to programmatically register your test device.

1. Load your ads-integrated app and make an ad request.

2. For **iOS** follow step 3, for **Android** skip to step 4.

3. Check the console for a message that looks like this:

   ```
   GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers =
     @[ @"2077ef9a63d2b398840261c8221a0c9b"  ]; // Sample device ID
   ```

   Copy your test device ID to your clipboard.

4. Check the logcat output for a message that looks like the one below, which shows you your device ID and how to add it as a test device:

   ```
   I/Ads: Use RequestConfiguration.Builder.setTestDeviceIds(Arrays.asList("33BE2250B43518CCDA7DE426D04EE231"))
   to get test ads on this device."
   ```

   Copy your test device ID to your clipboard.

5. Modify your code to set the test device ID through testDeviceIdentifiers

   ```js
   import mobileAds from 'react-native-google-mobile-ads';

   mobileAds()
     .setRequestConfiguration({
       // An array of test device IDs to add to the allow list.
       testDeviceIdentifiers: ['2077ef9a63d2b398840261c8221a0c9b', 'EMULATOR'],
     })
     .then(() => {
       // Request config successfully set!
     });
   ```

6. Re-run your app. If the ad is a Google ad, you'll see a Test Ad label centered at the top of the ad.
   Ads with this Test Ad label are safe to click. Requests, impressions, and clicks on test ads will not show up in your account's reports.

## Emulator vs real device

In some cases ads won't show up on an emulator but will show up while testing on a real device.

## Are you using a private DNS provider?

Some private DNS providers can block ads from displaying. If your device or emulator is using a private DNS, switch it to Automatic in the settings to ensure it is not blocking ads.

## Extra links

- Mobile Ads SDK [iOS](https://developers.google.com/admob/ios/quick-start), [Android](https://developers.google.com/admob/android/quick-start)
- [Common reasons for ads not showing](https://support.google.com/admob/answer/9469204)
